package monitoring.application;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import monitoring.UssProjectView;

/*
 * Author : Mohamed Delhomme
 */

public class StopServerAction extends AbstractAction {

/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
    private UssProjectView monitor;
	
	public StopServerAction(UssProjectView monitor, String texte){
		super(texte);
		
		this.monitor = monitor;
	}
	
	public void actionPerformed(ActionEvent e) { 
		// stop the server
//		monitor.server.
		
		monitor.labelStatusServer.setText("   Status : server currently on   ");
		
		monitor.buttonStartServer.setEnabled(true);
		monitor.buttonStopServer.setEnabled(false);
		
		monitor.startServerItem.setEnabled(true);
		monitor.stopServerItem.setEnabled(false);
	}

}
